import {request} from "@/utils/request";

export function roleList(data) {
  return request({
    url: "/role/list",
    method: "get",
    params: data,
  });
}
export function menuList(data) {
  return request({
    url: "/server/menu/list?_page=1&_limit=1000000",
    method: "get",
    params: data,
  });
}
export function roleDelete(id) {
  return request({
    url: `/role?id=${id}`,
    method: "delete",
  });
}
export function roleSave(data) {
  return request({
    url: "/role",
    method: "post",
    data,
  });
}
export function roleMenu(id) {
  return request({
    url: `/server/menu/roleid?roleid=${id}`,
    method: "get",
  });
}
// 编辑角色菜单
export function roleMenuUpdate(data) {
  return request({
    url: "/role",
    method: "put",
    data,
  });
}
